home *** CD-ROM | disk | FTP | other *** search
/ 220 Jogos / 220 jogos.iso / classicos / resta11 / MainWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-24  |  2.6 KB  |  113 lines

  1. #if !defined(AFX_MAINWINDOW_H__EEE0B52E_4067_11D4_A708_0050DA829896__INCLUDED_)
  2. #define AFX_MAINWINDOW_H__EEE0B52E_4067_11D4_A708_0050DA829896__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // MainWindow.h : Header-Datei
  8. //
  9. #include <gl\gl.h>
  10. #include <gl\glu.h>
  11. #include <gl\glaux.h>
  12.  
  13. #include "OpenGLDevice.h"
  14. #include "SScreenMode.h"
  15. #include "STexture.h"
  16. #include "STreefield.h"
  17. #include "STimer.h"
  18. #include "SSnowflakes.h"
  19. #include "SIntroScene.h"
  20. #include "SSoundSystem.h"
  21. #include "SEndScene.h"
  22.  
  23. #define NUM_TEXTURES 4
  24.  
  25. enum 
  26. {
  27.     TEX_BAUM,
  28.     TEX_BAUM_STAMM,
  29.     TEX_SNOWFLAKE,
  30.     TEX_FLASCHE
  31. };
  32.  
  33. enum SDemoState
  34. {
  35.     STATE_INTRO,
  36.     STATE_GAME,
  37.     STATE_END,
  38.     STATE_MOVING
  39. };
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // Fenster CMainWindow 
  43.  
  44. class CMainWindow : public CWnd
  45. {
  46. // Konstruktion
  47. public:
  48.     CMainWindow();
  49.  
  50. // Attribute
  51. public:
  52.  
  53. // Operationen
  54. public:
  55.  
  56. // ▄berschreibungen
  57.     // Vom Klassen-Assistenten generierte virtuelle Funktionsⁿberschreibungen
  58.     //{{AFX_VIRTUAL(CMainWindow)
  59.     protected:
  60.     //}}AFX_VIRTUAL
  61.  
  62. // Implementierung
  63. public:
  64.     void CreateGLWindow();
  65.     void Update();
  66.     virtual ~CMainWindow();
  67.  
  68.     // Generierte Nachrichtenzuordnungsfunktionen
  69. protected:
  70.     void DrawMouseCursor();
  71.     void Minimize();
  72.     bool fullscreen;
  73.     void UpdateView();
  74.     void InitGL();
  75.     void DrawGLScene();
  76.     void FadeOut(int delay);
  77.     CClientDC* clientDC;
  78.     SScreenMode screenMode;
  79.     OpenGLDevice openGLDevice;
  80.     STexture textures[NUM_TEXTURES];
  81.     STreeField treefield;
  82.     SSnowflakes snowflakes;
  83.     SIntroScene intro;
  84.     SSoundSystem soundSystem;
  85.     float movement[2];
  86.     SEndScene endScene;
  87.  
  88.     STimer timer;
  89.     float frametime;
  90.     float mousePosition[2];
  91.     bool mouseDown;
  92.     SDemoState demoState;
  93.     //{{AFX_MSG(CMainWindow)
  94.     afx_msg void OnSize(UINT nType, int cx, int cy);
  95.     afx_msg void OnClose();
  96.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  97.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  98.     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  99.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  100.     afx_msg void OnKillFocus(CWnd* pNewWnd);
  101.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  102.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  103.     //}}AFX_MSG
  104.     DECLARE_MESSAGE_MAP()
  105. };
  106.  
  107. /////////////////////////////////////////////////////////////////////////////
  108.  
  109. //{{AFX_INSERT_LOCATION}}
  110. // Microsoft Visual C++ fⁿgt unmittelbar vor der vorhergehenden Zeile zusΣtzliche Deklarationen ein.
  111.  
  112. #endif // AFX_MAINWINDOW_H__EEE0B52E_4067_11D4_A708_0050DA829896__INCLUDED_
  113.